#include "app_message.h"
#include "log.h"

int main(int argc, char const *argv[])
{
    char data[9]={0x01,0x02,0x04,0x6e,0x6e,0x41,0x42,0x43,0x44};
    char *json= app_message_bytes_to_json(data,9);
    log_info("%s",json);

    char *json_str="{\"conn_type\":1,\"id\":\"6f6f\",\"msg\":\"41424344\"}";
    char data_buff[100];
    int data_len= app_message_json_to_bytes(json_str,data_buff,100);
    for (size_t i = 0; i < data_len; i++)
    {
        printf("%02x ",data_buff[i]);
    }
    

    return 0;
}


